<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <#include "../common/header.ftl">

    <script type="text/javascript">
    	$(function(){

    		$('#pagination').twbsPagination({
    			totalPages:${result.pages},
    			startPage:${result.pageNum},
    			visiblePages:${result.pageSize},
    			first:"首页",
    			prev:"上页",
    			next:"下页",
    			last:"尾页",
    			//event 表示事件对象
    			//page 表示页码: 当前页
    			onPageClick:function(event, page){
    				//讲当前页设置page值
    				$("#currentPage").val(page);
    				//表单提交gjk,mb/.
    				$("#searchForm").submit();
    			}
    		});



    	})
    </script>
</head>
<body>

<div class="container " style="margin-top: 20px">
    <#include "../common/top.ftl">
    <div class="row">
        <div class="col-sm-3">
        <#include "../common/menu.ftl">
        </div>
        <div class="col-sm-9">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">注册用户列表</h1>
                </div>
            </div>
            <!--高级查询--->
            <form class="form-inline" id="searchForm" action="/user/list.do" method="post">
                <input type="hidden" name="currentPage" id="currentPage" value="1">
            </form>

            <table class="table table-striped table-hover" >
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>邮箱</th>
                        <th>昵称</th>
                        <th>头像</th>
                        <th>所在地区</th>
                        <th>性别</th>
                        <th>签名</th>
                    </tr>
                </thead>
                   <#list result.list as entity>
                       <tr>
                           <td>${entity_index+1}</td>
                           <td>${entity.email}</td>
                           <td>${entity.nickName}</td>
                           <td><img src="${entity.headImgUrl}" width="30px"/></td>
                           <td>${entity.place}</td>
                           <td>
                               <#if entity.gender==-1>
                                   保密
                                   <#elseif entity.gender==0>
                                    女
                                    <#elseif entity.gender==1>
                                   男
                               </#if>
                           </td>
                           <td>${entity.sign}</td>
                       </tr>
                   </#list>
            </table>
            <div style="text-align: center;">
                <ul id="pagination" class="pagination"></ul>
            </div>
        </div>
    </div>
</div>




</body>
</html>